{% extends "base.html" %}
{# Copyright The IETF Trust 2019, All Rights Reserved #}
{% load origin %}
{% load django_bootstrap5 %}
{% block title %}Approve downward references for {{ doc }}{% endblock %}
{% block content %}
    {% origin %}
    <h1>
        Approve downward references
        <br>
        <small class="text-body-secondary">{{ doc }}</small>
    </h1>
    <p>
        The ballot for
        <a href="{% url "ietf.doc.views_doc.document_main" name=doc.name %}">{{ doc }}</a>
        was just approved.
    </p>
    {% if not downrefs_to_rfc %}
        <p>
            No downward references for
            <a href="{% url "ietf.doc.views_doc.document_main" name=doc.name %}">{{ doc }}</a>
        </p>
        <a class="btn btn-secondary"
           href="{% url "ietf.doc.views_doc.document_main" name=doc.name %}">Back</a>
    {% else %}
        <p>
            Add downward references to RFCs to the DOWNREF registry, if they were identified in the IETF Last Call and approved by the Sponsoring Area Director.
        </p>
        <p>
            <b>Last Call text for this document:</b>
        </p>
        <pre class="border p-3">
                        {{ last_call_text }}
                    </pre>
        <p>
            <b>This document has downward references to the following RFCs.
                <br>
            Which downward references, if any, are to be added to the DOWNREF registry?</b>
        </p>
        <form method="post">
            {% csrf_token %}
            {% bootstrap_form approve_downrefs_form %}
            <a class="btn btn-primary"
               href="{% url "ietf.doc.views_doc.document_main" name=doc.name %}">
                Add no DOWNREF entries
            </a>
            <button type="submit" class="btn btn-warning" value="Save checked downrefs">Add checked DOWNREF entries</button>
        </form>
    {% endif %}
{% endblock %}